﻿<UserControl x:Class="ExORMDesginer.UserControls.Dialogs.SolutionBowserDialogView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
       Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <DataTemplate x:Key="FirstColumnCellTemplate" >
            <StackPanel Orientation="Horizontal">
                <Image Source="/ExORMDesginer;component/Images/Folder.png" />
                <TextBlock Text="{Binding Name}" FontSize="13" Margin="5"/>
            </StackPanel>
        </DataTemplate>

    </UserControl.Resources>
    <Grid MinWidth="550">
        <Grid.RowDefinitions>
            <RowDefinition Height="480" />
            <RowDefinition Height="38" />
        </Grid.RowDefinitions>
        <telerik:RadTreeListView x:Name="RadTreeListView1" IsBusy="{Binding Model.IsLoaded}"  SelectedItem="{Binding Model.CurrentItemInfo}" AutoGenerateColumns="False" IsReadOnly="True" DataLoadMode="Asynchronous"  ItemsSource="{Binding Model.ProjectItemInfoList,IsAsync=True}" 
                                 IsFilteringAllowed="False" Grid.Row="0" GridLinesVisibility="None"   BorderThickness="0" CanUserSortColumns="False" >
            <telerik:RadTreeListView.ChildTableDefinitions>
                <telerik:TreeListViewTableDefinition ItemsSource="{Binding ProjectItemInfoList,IsAsync=True}" />
            </telerik:RadTreeListView.ChildTableDefinitions>
            <telerik:RadTreeListView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" CellTemplate="{StaticResource FirstColumnCellTemplate}" Header="名称" Width="200" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ItemType}" Header="项目类型" Width="130"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding FullPath}" Header="路径" Width="*"/>
            </telerik:RadTreeListView.Columns>
        </telerik:RadTreeListView>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1">
            <Button Name="Save" Width="67" VerticalAlignment="Center" Margin="5">保存</Button>
            <Button Name="Cancel" Width="67" VerticalAlignment="Center" Margin="5">取消</Button>
        </StackPanel>
    </Grid>
</UserControl>
